<template>
  <div class="empty-box">
    <img class="empty-img" :src="img || defaultImg">
    <div class="empty-tip">{{ tip || '空空如也' }}</div>
    <slot></slot>
  </div>
</template>

<script>
export default {
  props: ["img", 'tip'],

  data() {
    return {
      defaultImg: require("@/assets/img/empty.png")
    }
  }
}
</script>

<style lang="less" scoped>
@import '@/assets/css/index.less';

.empty-box {
  animation: 1s appear;
  .flex-center-center();
  flex-direction: column;
  height: 100%;
  padding-top: 200px;

  .empty-img{
    height: 200px;
    width: 200px;
  }
  
  .empty-tip{
    font-size: 14px;
    color: #b6b6b6;
    margin-top: 20px;
  }
}

@keyframes appear {
  0% {
    opacity: 0;
  }
}
</style>
